package com.lifeng;

import org.apache.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;

/**
 * @Description: 扩展springboot的启动方式  
 * @author  lifeng
 * @date 2017年3月10日 下午9:44:55 
 * @version V1.0
 */
@ServletComponentScan
@SpringBootApplication
public class Application extends SpringBootServletInitializer{
	private static Logger logger = Logger.getLogger(Application.class);
	
	@Override
	public SpringApplicationBuilder configure(
			SpringApplicationBuilder builder) {
		return builder.sources(Application.class);
	}
	
	public static void main(String[] args) throws Exception {
    	logger.debug("调试日志。。。。。");
        SpringApplication.run(Application.class, args);
    }
}
